[deps.host]
dynamic-toolchain

[mirrors]
http://tukaani.org/xz/xz-5.2.1.tar.bz2

[vars]
filesize=1186051
sha512=cc1105e7d53e3164fb6d7abfc02b205c7ac703daad68953d80c0f73b6ddbe154f6234f525178dec2c9e82e647800f404205a4b59ab5c6fe654aa8aed55e09673

[build]
printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > tests/Makefile.in
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine)"
# the stage0 arm toolchain has a slightly broken libgcc (with external deps to libc)
# this package is the only one that fails to build.
# so let it depend on the stage1 toolchain. another fix could be to add -lc at the
# end of the gcc invocation in musl-gcc.
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" \
    --disable-nls --with-pic --enable-shared \
    --enable-static $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
